import { createRouter, createWebHistory } from 'vue-router'
import Container from '../views/Container.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Container',
      component: Container,
    },
    {
      path: '/city/:adcode', // 动态adcode参数
      name: 'CityView',
      component: () => import('../views/CityView.vue'),
      props: true // 将路由参数作为props传递
    }
  ],
})

export default router
